package com.yw.thesimpllestplayer.mediaplayer.decoder;

import android.media.MediaCodec;

import java.nio.ByteBuffer;

/**
 * @ProjectName: TheSimpllestplayer
 * @Package: com.yw.thesimpllestplayer.mediaplayer.decoder
 * @ClassName: Frame
 * @Description: 一帧数据
 * @Author: wei.yang
 * @CreateDate: 2021/11/6 10:36
 * @UpdateUser: 更新者：wei.yang
 * @UpdateDate: 2021/11/6 10:36
 * @UpdateRemark: 更新说明：
 * @Version: 1.0
 */
public class Frame {
    ByteBuffer buffer = null;
    MediaCodec.BufferInfo bufferInfo = new MediaCodec.BufferInfo();

    public void setBufferInfo(MediaCodec.BufferInfo info) {
        this.bufferInfo.set(info.offset, info.size, info.presentationTimeUs, info.flags);
    }
}
